/*
编写 : Hexh
时间 : 2012-5-17 10:27:14
*/
using System;
using System.Collections.Generic;
using FsCarInfo.Core.Entity;
using FsCarInfo.Core.Entity.IRespositories;
using HMIS.FrameWork;
using HMIS.FrameWork.DomainBase;

namespace FsCarInfo.Facade.Impl
{
	/// <summary>
	///	 the impl of IFsCarbaseinfoFacade
	/// </summary>
	public class FsCarbaseinfoFacadeImpl : IFsCarbaseinfoFacade
	{

		private readonly IFsCarbaseinfoRepository FsCarbaseinfoRepository;

		public FsCarbaseinfoFacadeImpl(IFsCarbaseinfoRepository FsCarbaseinfoRepository)
        {
			this.FsCarbaseinfoRepository = FsCarbaseinfoRepository;
        }

        #region IFsCarbaseinfo Entity Save,Get,Update,Delete

		public FsCarbaseinfo Get(string id)
		{
			return FsCarbaseinfoRepository.Get(id);
		}

		public FsCarbaseinfo Load(string id)
		{
			return FsCarbaseinfoRepository.Load(id);
		}

		public FsCarbaseinfo GetByQuery(string q_query)
		{
			return FsCarbaseinfoRepository.GetByQuery(q_query);
		}

		public void SaveOrUpdate(FsCarbaseinfo entity)
		{
			this.FsCarbaseinfoRepository.SaveOrUpdate(entity);
		}

		public void Delete(string id)
		{
			FsCarbaseinfoRepository.Delete(id);
		}
		
		public void PhysicsDelete(string id)
		{
			FsCarbaseinfoRepository.PhysicsDelete(id);
		}

		public bool IsFieldExist(string fieldName, string fieldValue, string id)
		{
			return FsCarbaseinfoRepository.IsFieldExist(fieldName, fieldValue, id);
		}

		public bool IsFieldExistWhere(string fieldName, string fieldValue, string id, string where)
		{
			return FsCarbaseinfoRepository.IsFieldExistWhere(fieldName, fieldValue, id, where);
		}
		
		#endregion
		
		#region Query 

		public IList<FsCarbaseinfo> GetAll()
		{
			return FsCarbaseinfoRepository.GetAll();
		}

		public IList<FsCarbaseinfo> GetPlist(string query, string state, string departmentid, string group, int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
        {
			return FsCarbaseinfoRepository.GetPlist(query, state, departmentid, group, start, limit, sort, dir, filters, out total);
        }
		
		#endregion
	}
}
